#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
@Time   : 2019/11/26 19:35
@Author : LeeCQ
@File Name: base-64.py
"""
import base64

p = base64.b64encode(open('./_b64.jpg', 'rb').read())

open('./new.bin', 'wb').write(p)

t = base64.b64decode(open('./new.bin', 'rb').read())

open('./new.jpg', 'wb').write(t)